home *** CD-ROM | disk | FTP | other *** search
-
- /*⌐ Copyright 1991 UserLand Software, Inc. All Rights Reserved.*/
-
-
- #ifndef __APPLEEVENTS__
-
- #include <AppleEvents.h>
-
- #endif
-
-
- #define __MENUSHARING__ /*so other modules can tell that we've been included*/
-
-
-
- typedef struct tysharedmenurecord { /*must match scripting system record structure*/
-
- short idmenu; /*the resource id of the menu*/
-
- int flhierarchic: 1; /*if true it's a hiearchic menu*/
-
- int flinserted: 1; /*if true the menu has been inserted in the menu bar*/
-
- MenuHandle hmenu; /*a handle to the Mac Menu Manager's data structure*/
- } tysharedmenurecord;
-
-
- typedef tysharedmenurecord tymenuarray [1];
-
- typedef tymenuarray **hdlmenuarray;
-
- typedef Boolean (*tyMScallback) (void);
-
-
- typedef struct tyMSglobals { /*Menu Sharing globals, all in one struct*/
-
- OSType serverid; /*identifier for shared menu server*/
-
- OSType clientid; /*id of this application*/
-
- hdlmenuarray hsharedmenus; /*data structure that holds shared menus*/
-
- Boolean fldirtysharedmenus; /*if true, menus are reloaded next time app comes to front*/
-
- Boolean flscriptcancelled; /*set true by calling CancelSharedScript*/
-
- Boolean flscriptrunning; /*true if a script is currently running*/
-
- tyMScallback scriptcompletedcallback; /*if non-nil, it's called when the script completes*/
- } tyMSglobals;
-
-
- extern tyMSglobals MSglobals; /*menu sharing globals*/
-
-
- /*basic Menu Sharing routines*/
-
- pascal Boolean InitSharedMenus (void);
-
- pascal Boolean SharedMenuHit (short, short);
-
- pascal Boolean SharedScriptRunning (void);
-
- pascal Boolean CancelSharedScript (void);
-
- pascal Boolean CheckSharedMenus (short);
-
- pascal Boolean SharedScriptCancelled (AppleEvent *, AppleEvent *);
-
-
- /*special-purpose routines*/
-
- pascal Boolean DisposeSharedMenus (void);
-
- pascal Boolean IsSharedMenu (short);
-
- pascal Boolean EnableSharedMenus (Boolean);
-
- pascal Boolean RunSharedMenuItem (short, short);
-
-